Integrand size = 21, antiderivative size = 98 \[ \int \csc ^2(c+d x) (a+a \sec (c+d x))^n \, dx=-\frac {\cot (c+d x) (a+a \sec (c+d x))^n}{d}+\frac {2^{-\frac {1}{2}+n} n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3}{2}-n,\frac {3}{2},\frac {1}{2} (1-\sec (c+d x))\right ) (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)}{d} \]
-cot(d*x+c)*(a+a*sec(d*x+c))^n/d+2^(-1/2+n)*n*hypergeom([1/2, 3/2-n],[3/2] ,1/2-1/2*sec(d*x+c))*(1+sec(d*x+c))^(-1/2-n)*(a+a*sec(d*x+c))^n*tan(d*x+c) /d
Time = 1.51 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.45 \[ \int \csc ^2(c+d x) (a+a \sec (c+d x))^n \, dx=-\frac {2^{-1+n} \left (\cot ^2\left (\frac {1}{2} (c+d x)\right ) \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},n,\frac {1}{2},\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )-\operatorname {Hypergeometric2F1}\left (\frac {1}{2},n,\frac {3}{2},\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )\right ) \left (\cos (c+d x) \sec ^2\left (\frac {1}{2} (c+d x)\right )\right )^n \left (\cos ^2\left (\frac {1}{2} (c+d x)\right ) \sec (c+d x)\right )^n (1+\sec (c+d x))^{-n} (a (1+\sec (c+d x)))^n \tan \left (\frac {1}{2} (c+d x)\right )}{d} \]
-((2^(-1 + n)*(Cot[(c + d*x)/2]^2*Hypergeometric2F1[-1/2, n, 1/2, Tan[(c + d*x)/2]^2] - Hypergeometric2F1[1/2, n, 3/2, Tan[(c + d*x)/2]^2])*(Cos[c + d*x]*Sec[(c + d*x)/2]^2)^n*(Cos[(c + d*x)/2]^2*Sec[c + d*x])^n*(a*(1 + Se c[c + d*x]))^n*Tan[(c + d*x)/2])/(d*(1 + Sec[c + d*x])^n))
Time = 0.47 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3042, 4363, 25, 3042, 4315, 3042, 4314, 79}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \csc ^2(c+d x) (a \sec (c+d x)+a)^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a-a \csc \left (c+d x-\frac {\pi }{2}\right )\right )^n}{\cos \left (c+d x-\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 4363 |
\(\displaystyle -a n \int -\sec (c+d x) (\sec (c+d x) a+a)^{n-1}dx-\frac {\cot (c+d x) (a \sec (c+d x)+a)^n}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle a n \int \sec (c+d x) (\sec (c+d x) a+a)^{n-1}dx-\frac {\cot (c+d x) (a \sec (c+d x)+a)^n}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a n \int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^{n-1}dx-\frac {\cot (c+d x) (a \sec (c+d x)+a)^n}{d}\) |
\(\Big \downarrow \) 4315 |
\(\displaystyle n (\sec (c+d x)+1)^{-n} (a \sec (c+d x)+a)^n \int \sec (c+d x) (\sec (c+d x)+1)^{n-1}dx-\frac {\cot (c+d x) (a \sec (c+d x)+a)^n}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle n (\sec (c+d x)+1)^{-n} (a \sec (c+d x)+a)^n \int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (\csc \left (c+d x+\frac {\pi }{2}\right )+1\right )^{n-1}dx-\frac {\cot (c+d x) (a \sec (c+d x)+a)^n}{d}\) |
\(\Big \downarrow \) 4314 |
\(\displaystyle -\frac {n \tan (c+d x) (\sec (c+d x)+1)^{-n-\frac {1}{2}} (a \sec (c+d x)+a)^n \int \frac {(\sec (c+d x)+1)^{n-\frac {3}{2}}}{\sqrt {1-\sec (c+d x)}}d\sec (c+d x)}{d \sqrt {1-\sec (c+d x)}}-\frac {\cot (c+d x) (a \sec (c+d x)+a)^n}{d}\) |
\(\Big \downarrow \) 79 |
\(\displaystyle \frac {2^{n-\frac {1}{2}} n \tan (c+d x) (\sec (c+d x)+1)^{-n-\frac {1}{2}} (a \sec (c+d x)+a)^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3}{2}-n,\frac {3}{2},\frac {1}{2} (1-\sec (c+d x))\right )}{d}-\frac {\cot (c+d x) (a \sec (c+d x)+a)^n}{d}\) |
-((Cot[c + d*x]*(a + a*Sec[c + d*x])^n)/d) + (2^(-1/2 + n)*n*Hypergeometri c2F1[1/2, 3/2 - n, 3/2, (1 - Sec[c + d*x])/2]*(1 + Sec[c + d*x])^(-1/2 - n )*(a + a*Sec[c + d*x])^n*Tan[c + d*x])/d
3.2.54.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(( a + b*x)^(m + 1)/(b*(m + 1)*(b/(b*c - a*d))^n))*Hypergeometric2F1[-n, m + 1 , m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m, n}, x] && !IntegerQ[m] && !IntegerQ[n] && GtQ[b/(b*c - a*d), 0] && (RationalQ[m] || !(RationalQ[n] && GtQ[-d/(b*c - a*d), 0]))
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[a^2*d*(Cot[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x ]]*Sqrt[a - b*Csc[e + f*x]])) Subst[Int[(d*x)^(n - 1)*((a + b*x)^(m - 1/2 )/Sqrt[a - b*x]), x], x, Csc[e + f*x]], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0] && !IntegerQ[m] && GtQ[a, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[a^IntPart[m]*((a + b*Csc[e + f*x])^FracPart[m ]/(1 + (b/a)*Csc[e + f*x])^FracPart[m]) Int[(1 + (b/a)*Csc[e + f*x])^m*(d *Csc[e + f*x])^n, x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^ 2, 0] && !IntegerQ[m] && !GtQ[a, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)/cos[(e_.) + (f_.)*(x_)]^2, x_Symbol] :> Simp[Tan[e + f*x]*((a + b*Csc[e + f*x])^m/f), x] + Simp[b*m Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^(m - 1), x], x] /; FreeQ[{a, b, e, f, m}, x]
\[\int \csc \left (d x +c \right )^{2} \left (a +a \sec \left (d x +c \right )\right )^{n}d x\]
\[ \int \csc ^2(c+d x) (a+a \sec (c+d x))^n \, dx=\int { {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{2} \,d x } \]
\[ \int \csc ^2(c+d x) (a+a \sec (c+d x))^n \, dx=\int \left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{n} \csc ^{2}{\left (c + d x \right )}\, dx \]
\[ \int \csc ^2(c+d x) (a+a \sec (c+d x))^n \, dx=\int { {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{2} \,d x } \]
\[ \int \csc ^2(c+d x) (a+a \sec (c+d x))^n \, dx=\int { {\left (a \sec \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{2} \,d x } \]
Timed out. \[ \int \csc ^2(c+d x) (a+a \sec (c+d x))^n \, dx=\int \frac {{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^n}{{\sin \left (c+d\,x\right )}^2} \,d x \]